Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR syncs the repo with v26-0-0 API/binding changes, primarily standardizing Python wrapper return conventions (status-first tuples), expanding py::list interoperability, and updating the Python engine/session plumbing (wstring notifications, key-in args, session info).
Changes:
- Standardize many Python bindings to return
(status, result)and update corresponding docstrings/tests/samples. - Add additional py::list overloads and Python container conveniences (
__len__, iterators, list conversions) across multiple wrapper types. - Enhance Python engine/session handling (wstring error/output plumbing, key-in argument passing, session info storage, build file restructuring, new samples/tests).
Reviewed changes
Copilot reviewed 115 out of 120 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| PublicAPI/MSPythonCore/ScriptEngineManager.h | Switch notifier messages to wstring; add session APIs; replace namespace macros. |
| MSPythonWrapper/PyMstnPlatform/source/PSolid/psolidcoreapi.cpp | Add py::list overloads for SolidUtil.Modify methods (Blend/Chamfer/Hollow/Offset variants). |
| MSPythonWrapper/PyMstnPlatform/source/Plot/IPrintDescription.cpp | Add py::list overload for GetViewIndependentWorkingFence; minor cleanup. |
| MSPythonWrapper/PyMstnPlatform/source/Plot/IPlotter.cpp | Add py::list overload for FindBestFitForm. |
| MSPythonWrapper/PyMstnPlatform/source/MdlApi/msview.cpp | Add py::list overloads for view list/boolean-array style APIs. |
| MSPythonWrapper/PyMstnPlatform/source/isessionmgr.cpp | Swap tuple return ordering + doc updates for session mgr dialogs. |
| MSPythonWrapper/PyMstnPlatform/source/ImageLib/ImageLibApi.cpp | Reacquire GIL before building Python tuple result. |
| MSPythonWrapper/PyMstnPlatform/source/documentmanager.cpp | Swap tuple return ordering + doc updates for document manager dialogs. |
| MSPythonWrapper/PyECObjects/source/ecschema.cpp | Add __len__ to ECClassContainer iterator wrapper. |
| MSPythonWrapper/PyECObjects/PyECObjects.mke.sourcemap.json | New sourcemap manifest for PyECObjects build. |
| MSPythonWrapper/PyDgnView/testUtilities/PyDgnViewTest.mke.sourcemap.json | New sourcemap manifest for PyDgnView tests. |
| MSPythonWrapper/PyDgnView/source/ParentTypes/iviewmanager.cpp | Add __len__ to IndexedViewSet wrapper. |
| MSPythonWrapper/PyDgnView/PyDgnView.mke.sourcemap.json | New sourcemap manifest for PyDgnView build. |
| MSPythonWrapper/PyDgnPlatform/testUtilities/PyDgnPlatformTest.mke.sourcemap.json | New sourcemap manifest for PyDgnPlatform tests. |
| MSPythonWrapper/PyDgnPlatform/source/xmlfragment.cpp | Add __len__ to XmlFragmentList wrapper. |
| MSPythonWrapper/PyDgnPlatform/source/xdatanodecollection.cpp | Add __len__ to XDataNodeCollection wrapper. |
| MSPythonWrapper/PyDgnPlatform/source/xattributeiter.cpp | Add __len__ to XAttributeCollection wrapper. |
| MSPythonWrapper/PyDgnPlatform/source/workset.cpp | Add __len__ to WorkSetCollection wrapper. |
| MSPythonWrapper/PyDgnPlatform/source/unitdefinition.cpp | Add __len__ to Standard/User unit collections. |
| MSPythonWrapper/PyDgnPlatform/source/texttablehandler.cpp | Add orientation-angle APIs + docstrings for TextTable/TextTableCell. |
| MSPythonWrapper/PyDgnPlatform/source/textblockiterators.cpp | Add __len__ to RunRange iterator wrapper. |
| MSPythonWrapper/PyDgnPlatform/source/sheetsizedefinition.cpp | Add __len__ to SheetSizeCollection wrapper. |
| MSPythonWrapper/PyDgnPlatform/source/scaledefinition.cpp | Add ctor + __len__ to ScaleCollection wrapper. |
| MSPythonWrapper/PyDgnPlatform/source/rastercollection.cpp | Add __len__ to DgnRasterCollection wrapper. |
| MSPythonWrapper/PyDgnPlatform/source/picklist.cpp | Return reference_internal for AddValue/AddPickList; add __len__. |
| MSPythonWrapper/PyDgnPlatform/source/material.cpp | Swap tuple return ordering + doc updates for MaterialManager searches. |
| MSPythonWrapper/PyDgnPlatform/source/linestyle.cpp | Swap tuple return ordering; add __len__ to LsMap; doc fixes. |
| MSPythonWrapper/PyDgnPlatform/source/light.cpp | Add __len__ to LightMapCollection wrapper. |
| MSPythonWrapper/PyDgnPlatform/source/itxnmanager.cpp | Swap tuple return ordering + doc updates for CreateNewModel. |
| MSPythonWrapper/PyDgnPlatform/source/elementtemplateparamshelper.cpp | Add fixed-size unit APIs + updated tuple-style docs. |
| MSPythonWrapper/PyDgnPlatform/source/elementrefbase.cpp | Add Python list-like behaviors to ElementRefVec (iter/del/contains/remove). |
| MSPythonWrapper/PyDgnPlatform/source/ecinstanceholderhandler.cpp | Swap tuple return ordering for CreateECInstanceHolderElement + doc update. |
| MSPythonWrapper/PyDgnPlatform/source/digitalsignaturecellheaderhandler.cpp | Add __len__ to ApplicableSignaturesCollection wrapper. |
| MSPythonWrapper/PyDgnPlatform/source/dgnraster.cpp | Swap tuple return ordering for DgnRaster::Create. |
| MSPythonWrapper/PyDgnPlatform/source/dgnmodelrefcollections.cpp | Add __len__ to reachable model/element collection wrappers. |
| MSPythonWrapper/PyDgnPlatform/source/dgnlinktree.cpp | Add __len__ to DgnLinkUserDataList wrapper. |
| MSPythonWrapper/PyDgnPlatform/source/dgnlinks.cpp | Swap tuple return ordering for DgnModelLink tuple-returning getters. |
| MSPythonWrapper/PyDgnPlatform/source/dgnlinkmanager.cpp | Swap tuple return ordering for CreateLink/CreateLinkSet; doc updates. |
| MSPythonWrapper/PyDgnPlatform/source/dgnitemindex.cpp | Add __len__ to ModelIndex wrapper. |
| MSPythonWrapper/PyDgnPlatform/source/dgnfile.cpp | Add LoadDgnFile doc; add __len__; swap tuple ordering in some methods. |
| MSPythonWrapper/PyBentleyGeom/testUtilities/PyGeomTest.mke.sourcemap.json | New sourcemap manifest for PyBentleyGeom tests. |
| MSPythonWrapper/PyBentleyGeom/source/rotmatrix.cpp | Fix invalid default-arg placement by removing default in binding. |
| MSPythonWrapper/PyBentleyGeom/source/curveprimitive.cpp | Add overloads for CreateSpiral, including maxStrokeLength. |
| MSPythonWrapper/PyBentley/source/ParentTypes/betextfile.cpp | Swap tuple return ordering for BeTextFile.Open + doc update. |
| MSPythonWrapper/PyBentley/source/bestringutilities.cpp | Swap tuple return ordering for ParseUInt64 + doc update. |
| MSPythonWrapper/PyBentley/PyBentley.mke.sourcemap.json | New sourcemap manifest for PyBentley build. |
| MSPythonTests/MstnPlatformTests/Tests/SessionMgr_Test.py | Update tests for status-first tuple returns; update mdlDescr expectations. |
| MSPythonTests/MstnPlatformTests/Tests/PylistTests/Psolidcoreapi_Pylist_Test.py | New tests covering new py::list overloads for PSolid APIs. |
| MSPythonTests/MstnPlatformTests/Tests/PylistTests/Msview_Pylist_test.py | New tests covering new py::list overloads for msview APIs. |
| MSPythonTests/MstnPlatformTests/Tests/PylistTests/IPrintDescription_Pylist_Test.py | New tests for GetViewIndependentWorkingFence py::list overload. |
| MSPythonTests/MstnPlatformTests/Tests/PylistTests/IPlotter_Pylist_Test.py | New tests for FindBestFitForm py::list overload. |
| MSPythonTests/MstnPlatformTests/Tests/PylistTests/Fenceparams_Pylist_test.py | New tests for FenceParams list/array conversions. |
| MSPythonTests/MstnPlatformTests/Tests/Mesh_Test.py | Update tuple unpacking order for getFileFromDirectory usage. |
| MSPythonTests/MstnPlatformTests/Tests/Level_Test.py | Update tuple return indexing order for file/document helpers. |
| MSPythonTests/MstnPlatformTests/Tests/KeyInManager_Test.py | Update callbacks to accept optional unparsed arg string. |
| MSPythonTests/MstnPlatformTests/Tests/DocumentManager_Test.py | Update tuple return indexing order for document manager APIs. |
| MSPythonTests/MstnPlatformTests/Tests/DgnFile_Test.py | Update tuple unpacking order for getFileFromDirectory usage. |
| MSPythonTests/MstnPlatformTests/Tests/ChangeTrackCallback_Test.py | Update CreateFromFileName usage (but currently inconsistent indexing). |
| MSPythonTests/MstnPlatformTests/Tests/ArgSupport_Test.py | New argparse-based key-in argument handling sample/test script. |
| MSPythonTests/MstnPlatformTests/Tests/AddURLLink_Test.py | Update CreateLink tuple return ordering. |
| MSPythonSamples/SystemCallbacks/ChangeTrackCallbacks.py | Update Add/Remove functions to accept optional unparsed arg string. |
| MSPythonSamples/ReportSample/ReportExample.commands.xml | New key-in command table for report example. |
| MSPythonSamples/ReportSample/report_Example.py | New report sample entrypoint + key-in loader. |
| MSPythonSamples/ReportSample/report_example_generate_report.py | New report-definition generation logic. |
| MSPythonSamples/ReportSample/report_example_create_itemtypes.py | New item type library/type creation logic. |
| MSPythonSamples/ReportSample/report_example_common.py | Shared config/utilities for report example workflow. |
| MSPythonSamples/ReportSample/report_example_attach_itemtypes.py | Tool/sample to attach item types to elements. |
| MSPythonSamples/ParametricModeling/VariableAndVariation.py | Update BeTextFile.Open tuple return ordering. |
| MSPythonSamples/ParametricModeling/PSampUtility.py | Update LoadRootModelById tuple return ordering. |
| MSPythonSamples/ParametricModeling/ParametricCell.py | Update LoadRootModelById tuple return ordering. |
| MSPythonSamples/ItemType/Custom/ItemTypeCustomProperty.py | Update key-in entrypoints to accept optional unparsed arg string. |
| MSPythonSamples/ItemType/CRUD/ItemTypeCRUD.py | Update key-in entrypoints to accept optional unparsed arg string. |
| MSPythonSamples/ItemType/Attach/ItemTypeAttachDetach.py | Update key-in entrypoints to accept optional unparsed arg string. |
| MSPythonSamples/GeospatialContext/SHPImportWithDesignLink.py | Update CreateLink tuple return ordering. |
| MSPythonSamples/GeospatialContext/GDBImportAsCell.py | Add FixedSizeUnitType handling via new template helper APIs. |
| MSPythonSamples/GeospatialContext/CreateCustomGCS_StlouisTM96.py | Handle tuple return from InitFromWellKnownText and validate status. |
| MSPythonSamples/GeospatialContext/AddGeographicCoordinateSystemToModel.py | Handle tuple returns from InitFromEPSGCode / InitFromWellKnownText. |
| MSPythonSamples/EC/Schema/ECXSchema.py | Update key-in entrypoints to accept optional unparsed arg string. |
| MSPythonSamples/EC/ExtractProperties/ExtractProperties.py | Update key-in entrypoint to accept optional unparsed arg string. |
| MSPythonSamples/EC/ECChangeEvents/DgnECChangeEvents.py | Update LoadRootModelById tuple return indexing order; key-in entrypoints updated. |
| MSPythonSamples/EC/Dump/ECDumpUtility.py | Update key-in entrypoint to accept optional unparsed arg string. |
| MSPythonSamples/EC/CRUD/ECCrud.py | Update key-in entrypoints to accept optional unparsed arg string. |
| MSPythonSamples/DgnTool/TextExample/TextExample.py | Update key-in entrypoints to accept optional unparsed arg string. |
| MSPythonSamples/DgnTool/PolyfaceTool/PolyfaceTool.py | Update key-in entrypoint to accept optional unparsed arg string. |
| MSPythonSamples/DgnTool/ModifyMultipleElements/ModifyMultipleElements.py | Update key-in entrypoints to accept optional unparsed arg string. |
| MSPythonSamples/DgnTool/ModifyEdgeSamples/ModifyEdgeSamples.py | Update key-in entrypoint to accept optional unparsed arg string. |
| MSPythonSamples/DgnTool/MeshTools/MeshTools.py | Update key-in entrypoints to accept optional unparsed arg string. |
| MSPythonSamples/DgnTool/IncrementText/IncrementText.py | Update key-in entrypoint to accept optional unparsed arg string. |
| MSPythonSamples/DgnTool/ElementLinkExample.py | Update CreateLink tuple return ordering; update key-in entrypoints. |
| MSPythonSamples/DgnElements/UnitConversionsSample.py | Update key-in entrypoint to accept optional unparsed arg string. |
| MSPythonSamples/DgnElements/TagsExamplePlaceTagFromText.py | Improve robustness; auto-create tag set; add additional messaging. |
| MSPythonSamples/DgnElements/TagsExampleCreateTagSet.py | Update messaging; make tagsExample_createTagSet key-in compatible; simplify main. |
| MSPythonSamples/DgnElements/TagsExampleCreateTagSet.commands.xml | Removed old command table XML. |
| MSPythonSamples/DgnElements/Reference/Reference.py | Update key-in entrypoints to accept optional unparsed arg string. |
| MSPythonSamples/DgnElements/MeshStyleSamples.py | Update key-in entrypoints to accept optional unparsed arg string. |
| MSPythonSamples/DgnElements/CreateTextNodes.py | Update tuple indexing for default model load result. |
| MSPythonCore/ScriptEngineManager/source/ScriptEngineManager.cpp | Add PythonSessionInfo + session result accumulation + silence mode. |
| MSPythonCore/ScriptEngineManager/source/MSPythonEngine.cpp | wstring InjectError; safer main dict backup; key-in arg invocation changes. |
| MSPythonCore/ScriptEngineManager/ScriptEngineManager.mki | Removed (build rules moved/reworked). |
| MSPythonCore/MSPythonCore.mke.sourcemap.json | New sourcemap manifest for MSPythonCore build. |
| MSPythonCore/MSPythonCore.mke | New build file replacing top-level MSPythonCore.mke. |
| MSPythonCore.mke | Removed (replaced by MSPythonCore/MSPythonCore.mke). |
| MSPython.mke | Update build invocation path for new MSPythonCore/MSPythonCore.mke. |
| InternalAPI/MSPyCommon.h | Improve pylist conversion casting and add bool conversion specializations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MSPythonTests/MstnPlatformTests/Tests/ChangeTrackCallback_Test.py
Outdated
Show resolved
Hide resolved
MSPythonCore/ScriptEngineManager/source/ScriptEngineManager.cpp
Outdated
Show resolved
Hide resolved
…oc tuple, skewFactor default, sessionInfo leak, escape sequences Agent-Logs-Url: https://github.com/BentleySystems/MicroStationPython/sessions/1b74d22e-fccd-4873-9498-b3ea7566b8cd Co-authored-by: ChrisWu2024 <169880503+ChrisWu2024@users.noreply.github.com>
auto-merge was automatically disabled
April 7, 2026 02:19
Head branch was pushed to by a user without write access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.